using System.Collections;
using System.Collections.Generic;
using QFramework;
using UnityEngine;

namespace AsterroidX
{
    public class ResetGameModelCmd : AbstractCommand
    {
        protected override void OnExecute()
        {
            var gameModel=this.GetModel<GameModel>();

            var powerUpUnlockSystem = this.GetSystem<PowerUpUnlockSystem>();

            gameModel.RockKillCount.Value = 0;

            gameModel.Score.Value = 0;

            gameModel.BaseRockSpeed = 1;

            gameModel.RockSpeedRate = 0.5f;

            gameModel.MaxRockCount = 6;

            gameModel.UFOLevel = 1;

            gameModel.TornadoBulletCount = 0;

            gameModel.RockCount = 0;
            gameModel.BulletCount = 0;

            gameModel.GamePass = false;

            gameModel.SecondsToGamePass.Value = Config.InitSecondsToGamePass;


            gameModel.GameSeconds.Value = 0;

            gameModel.UFOKillCount.Value = 0;

            gameModel.PowerUpGenerateDuration = 10;

            powerUpUnlockSystem.Reset();
        }
    }
}
